package com.hailtouniv.common.web;


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectOutputStream;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.jasperreports.engine.JRExporterParameter;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.export.JRXlsExporter;
import net.sf.jasperreports.engine.export.JRXlsExporterParameter;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsStatics;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class BaseAction extends ActionSupport {
	
	protected Logger logger = LoggerFactory.getLogger(getClass());
	
	protected ActionContext getContext() {
		return ActionContext.getContext();
	}

	protected HttpServletRequest getRequest() {
		return (HttpServletRequest) getContext().get(StrutsStatics.HTTP_REQUEST);
	}
	
	protected HttpServletResponse getResponse() {
		return (HttpServletResponse) getContext().get(StrutsStatics.HTTP_RESPONSE);
	}
}

